﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageGroups.aspx.cs" Inherits="SPUtilities.ManageGroupsPerUser.Layouts.SPUtilities.ManageGroupsPerUser.ManageGroups" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
      <style type="text/css">
        table
        {
        }

        .titleRow
        {
            font-weight: bold;
        }

        .class
        {
        }

        #id
        {
        }
    </style>
    
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
  
    <div style="padding-left: 20px">
        <table cellspacing="3">
            <tr>
                <td colspan="2" style="font-weight: bold; font-size: large">List Groups for Site Collection:
                    <asp:Label ID="lblProjectName" runat="server" />
                    <asp:Label ID="lblProjectUrl" runat="server" /><br />
                    <br />
                    <asp:Label ID="lblMessage" runat="server" />
                </td>
            </tr>
            <tr>
                <td style="width: 50px; vertical-align: top;">User to change:
                </td>
                <td>
                    <wssawc:PeopleEditor
                        AllowEmpty="false"
                        ValidatorEnabled="true"
                        ID="userPicker"
                        runat="server"
                        ShowCreateButtonInActiveDirectoryAccountCreationMode="true"
                        SelectionSet="User" MultiSelect="false" />
            </tr>
         
            <tr>
                <td style="text-align: left" colspan="2">
                    <table width="100%">
                        <tr>
                            <td colspan="2">
                                <asp:Button runat="server" ID="btnLoadGroups" Text="Enumerate Groups" CssClass="ms-ButtonHeightWidth" OnClick="btnLoadGroups_Click" />
                                <asp:CheckBox ID="chkCopy" runat="server" Checked="false" OnCheckedChanged="chkCopy_CheckedChanged" Text="Copy another user's permissions?" AutoPostBack="true" />
                               
                            </td>

                        </tr>
                     </table>

        </td>

    </tr>
        


        <tr runat="server" id="trCloneUserGroups" visible="false">
            <td style="width: 50px; vertical-align: top;">User to copy group associations:
            </td>
            <td>
                <wssawc:PeopleEditor
                    AllowEmpty="true"
                    ValidatorEnabled="true"
                    ID="userPickerToCopy"
                    runat="server"
                    ShowCreateButtonInActiveDirectoryAccountCreationMode="true"
                    SelectionSet="User" MultiSelect="false" />
                <asp:Button runat="server" ID="btnCopiarPermissoes" Text="Copy permissions" CssClass="ms-ButtonHeightWidth" OnClick="btnCopiarPermissoes_Click" />
            </td>
        </tr>
        <tr>
            <td colspan="2" class="titleRow">
                <asp:Label runat="server" ID="lblCopiyng" />
            </td>
        </tr>
        <tr>
            <td colspan="2" class="titleRow">Available groups to associate with the user
                <asp:Label runat="server" ID="lblUserName" />:
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:ListBox ID="lsbRemainingGroups" runat="server" Width="800" Height="260" SelectionMode="Multiple" />
            </td>
        </tr>
        <tr>
            <td style="text-align: center" colspan="2">
                <table width="100%">
                    <tr>
                        <td align="right">
                            <asp:ImageButton runat="server" ID="btnDown" ImageUrl="/_layouts/Images/mewa_downb.gif" OnClick="btnDown_Click" />
                        </td>
                        <td align="left">
                            <asp:ImageButton runat="server" ID="btnUp" ImageUrl="/_layouts/Images/mewa_upb.gif" OnClick="btnUp_Click" />
                        </td>
                    </tr>

                </table>


            </td>
            <tr>
            </tr>
            <tr>
                <td colspan="2" class="titleRow">Groups associated with the user
                    <asp:Label runat="server" ID="lblUserName2" />:
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:ListBox ID="lsbCurrentGroups" runat="server" Width="800" Height="260" SelectionMode="Multiple" />
                </td>
            </tr>
            <tr>
                <td style="text-align: center" colspan="2">
                    <table width="100%">
                        <tr>
                            <td align="right" style="width:50%">
                                <asp:Button runat="server" ID="btnSave" Text="Save Changes" CssClass="ms-ButtonHeightWidth" OnClick="btnSave_Click" />
                            </td>
                            <td align="left" style="width:50%">
                                <asp:Button runat="server" ID="btnCancelar" Text="Cancel" CssClass="ms-ButtonHeightWidth" OnClick="btnCancelar_Click" OnClientClick="if(!confirm('Deseja descartar alterações?')){ return false; }" />
                            </td>
                        </tr>
                    </table>                    
                </td>
                </tr>
        </table>



    </div>
    <div style="display: none" id="divCloneUserPermissions">
    </div>

</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    Manage Groups
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    Manage Groups
</asp:Content>